package com.foreknow.proxy.two;

public class Test {

    public static void proxy_test(){
        SuperMarketAction superMarketAction = new SuperMarket(); //被代理对象
        SuperMarketInvocationHandler marketInvocationHandler = new SuperMarketInvocationHandler(superMarketAction);
        SuperMarketAction marketAction= (SuperMarketAction) marketInvocationHandler.createProxy();
        marketAction.deliverGoods();
        marketAction.test();
    }
    public static void main(String[] args) {
        proxy_test();
    }
}
